<div id="category">
<?php 
	echo "<b>Departments</b>";
	$conn = mysql_connect($host, $user, $password) or die(mysql_error());
	mysql_select_db("etronix");
	
	$sql_cat = "SELECT * FROM category";
	$result_cat = mysql_query($sql_cat, $conn) or die(mysql_error());
	
	while ($row = mysql_fetch_assoc($result_cat)) {
		$cat_id = $row['CatID'];
		$cat_name = $row['CatName'];
		echo "<p><a href='#$cat_id'>$cat_name</a></p>";
	}
?>
</div>